<template>
    <div class="menu-demo">
    <a-menu mode="horizontal" :default-selected-keys="['1']">
      <a-menu-item key="/" @click="navTo('/')">首页</a-menu-item>
      <a-menu-item key="/cpu" @click="navTo('/cpu')">CPU监控</a-menu-item>
      <a-menu-item key="/line-simple" @click="navTo('/line-simple')">基础折线图</a-menu-item>
      <a-menu-item key="4">Cooperation</a-menu-item>
    </a-menu>
  </div>

</template>

<script setup>
import { useRouter } from 'vue-router';


const router = useRouter();

const navTo = (url)=>{
    router.push(url)
}
</script>

<style scoped>
.menu-demo {
  box-sizing: border-box;
  width: 100%;
  background-color: var(--color-neutral-2);
}
</style>